<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditFinancialTransactionTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditFinancialTransactionLabel_amount}" for="amount" />
                    <h:inputText id="amount" value="#{financialTransactionController.selected.amount}" title="#{bundle.EditFinancialTransactionTitle_amount}" required="true" requiredMessage="#{bundle.EditFinancialTransactionRequiredMessage_amount}"/>
                    <h:outputLabel value="#{bundle.EditFinancialTransactionLabel_decription}" for="decription" />
                    <h:inputText id="decription" value="#{financialTransactionController.selected.decription}" title="#{bundle.EditFinancialTransactionTitle_decription}" required="true" requiredMessage="#{bundle.EditFinancialTransactionRequiredMessage_decription}"/>
                    <h:outputLabel value="#{bundle.EditFinancialTransactionLabel_fromAccount}" for="fromAccount" />
                    <h:selectOneMenu id="fromAccount" value="#{financialTransactionController.selected.fromAccount}" title="#{bundle.EditFinancialTransactionTitle_fromAccount}" >
                        <f:selectItems value="#{accountController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditFinancialTransactionLabel_id}" for="id" />
                    <h:inputText id="id" value="#{financialTransactionController.selected.id}" title="#{bundle.EditFinancialTransactionTitle_id}" />
                    <h:outputLabel value="#{bundle.EditFinancialTransactionLabel_toAccount}" for="toAccount" />
                    <h:selectOneMenu id="toAccount" value="#{financialTransactionController.selected.toAccount}" title="#{bundle.EditFinancialTransactionTitle_toAccount}" >
                        <f:selectItems value="#{accountController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditFinancialTransactionLabel_transType}" for="transType" />
                    <h:inputText id="transType" value="#{financialTransactionController.selected.transType}" title="#{bundle.EditFinancialTransactionTitle_transType}" required="true" requiredMessage="#{bundle.EditFinancialTransactionRequiredMessage_transType}"/>
                    <h:outputLabel value="#{bundle.EditFinancialTransactionLabel_transactionDate}" for="transactionDate" />
                    <h:inputText id="transactionDate" value="#{financialTransactionController.selected.transactionDate}" title="#{bundle.EditFinancialTransactionTitle_transactionDate}" required="true" requiredMessage="#{bundle.EditFinancialTransactionRequiredMessage_transactionDate}"/>
                </h:panelGrid>
                <h:commandLink action="#{financialTransactionController.update}" value="#{bundle.EditFinancialTransactionSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditFinancialTransactionViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{financialTransactionController.prepareList}" value="#{bundle.EditFinancialTransactionShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditFinancialTransactionIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
